package com.leizhou.consumer;

import com.leizhou.consumer.client.UserClient;
import com.leizhou.consumer.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LT
 * @version 1.0.0
 * @ClassName ConsumerFeignController.java
 * @Description TODO
 * @createTime 2020年04月26日 00:47:00
 */
@RestController
@RequestMapping("/cf")
public class ConsumerFeignController {
    @Autowired(required = false)
    private UserClient userClient;

    @GetMapping("/{id}")
    public User findOne(@PathVariable("id") Long id) {
        return userClient.findOne(id);
    }
}
